package com.walter.exception;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import com.walter.pojo.WalterJSONResult;

//@RestControllerAdvice
/**
 * @author 1198266533
 *	单独处理ajax异常
 */
public class IMoocAjaxExceptionHandler {
	
//	@ExceptionHandler(value = Exception.class)
	public WalterJSONResult defaultErrorHandler(HttpServletRequest req, 
			Exception e) throws Exception {

		e.printStackTrace();
		return WalterJSONResult.errorException(e.getMessage());
	}
}
